﻿@using ZKEACMS.Message.Models
@model Comments
@{
    string host = hostOptionProvider.GetOrigin();
    string link = $"{host}/admin/Comments/Edit/{Model.ID}";
    Func<string, string> L = localize.Get;
}
@inject ZKEACMS.IHostOptionProvider hostOptionProvider
@inject Easy.ILocalize localize

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <style>
        body {
            font-size: 16px;
        }

        h1, h2, h3, h4, h5, h6 {
            margin-top: 0;
            margin-bottom: 1rem;
        }

        hr {
            border: 0;
            border-top: 1px solid #ccc;
        }

        p {
            margin-top: 0;
            margin-bottom: 0.5rem;
        }

            h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child, p:last-child {
                margin-bottom: 0;
            }
    </style>
</head>

<body style="background: #F2F4F5;">
    <div style="background: #fff;border: 1px solid #ccc; max-width: 600px; margin: 3rem auto 0 auto;">
        <div style="padding: 2rem;">
            <h3>
                @L("New comment")
            </h3>
            <table border="1" cellspacing="0" cellpadding="5" bgcolor="" style="border-color: #eee;">
                <tbody>
                    <tr>
                        <td>@L("Title")</td>
                        <td>@Model.Title</td>
                    </tr>
                    <tr>
                        <td>@L("Username")</td>
                        <td>@Model.UserName</td>
                    </tr>
                    <tr>
                        <td>@L("Comments")</td>
                        <td>@Model.CommentContent</td>
                    </tr>
                    <tr>
                        <td>@L("Page")</td>
                        <td><a href="@(host+Model.PagePath)" target="_blank">@(host + Model.PagePath)</a></td>
                    </tr>

                </tbody>
            </table>
            <p style="text-align: center;">
                <a style="display: inline-block; background: #2196F3;border: 1px solid #2589d8; text-decoration: none; padding: 0.6rem 1rem; color: #fff;"
                   href="@link"
                   target="_blank">@L("View")</a>
            </p>
        </div>
        <div style="padding: 1rem; border-top: 1px solid #ccc; font-size: 80%;">
            <p>
                <a href="@hostOptionProvider.GetOrigin()" target="_blank">
                    @L("ZKEASOFT")
                </a>
            </p>
        </div>
    </div>

</body>
</html>